package gov.jyy.xzxk.xksq.common.desensitization.interceptor;

import gov.jyy.xzxk.xksq.common.desensitization.DesensitizationContext;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @className: ThreadLocalCleanupInterceptor
 * @description: TODO 类描述
 * @author: liangshijie
 * @date: 2023/4/26
 **/
public class ThreadLocalCleanupInterceptor implements HandlerInterceptor {

    @Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
        DesensitizationContext.clearContext();
    }
}